Page({
  data: {
    newsList: [{
        id: 0,
        title: '垃圾分类“新时尚” 助力2023“迁马”开跑',
        author: '新浪财经',
        publishDate: '2023年4月1日',
        img: {
              imgSrc: 'https://t9.baidu.com/it/u=2239709741,1824682707&fm=217&app=125&size=f242,162&n=0&g=0n&f=JPEG?s=AABB71875133BB8420BDD92603003002&sec=1680433086&t=3e8ff05fdb7ac45a9a067502c754ce48'
        },
        img_condition: true
      },
      {
        id: 5,
        title: '垃圾分类入人心 文明风尚“童”践行',
        author: '红网',
        publishDate: '2023年4月1日',
        img: {
          imgSrc: 'https://t12.baidu.com/it/u=4236621605,200358119&fm=30&app=106&size=f242,162&n=0&g=0n&f=JPEG?s=9F187C8504C2F6E4580961320300F012&sec=1680433826&t=74015df915087856f5bfe7361e5521c0'
    },
    img_condition: true
      }
    ]
  },
  onLoad: function (options) {

  },
  todetail: function (e) {
    var that=this;
    const data= that.data.newsList[e.target.dataset.options];
    const target = JSON.stringify(data);
    console.log(target);
    wx.navigateTo({
      url: '../news_details/news_details?info=' + target
    })
  }
})
